import 'package:provider/provider.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import '../../provider/details_info.dart';

class DetailsWeb extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Consumer<DetaiInfoProvider>(
        builder: (context, DetaiInfoProvider detaiInfoProvider, child) {
          String goodDetail = detaiInfoProvider.goodsInfo.data.goodInfo.goodsDetail;
          bool isLeft = detaiInfoProvider.isLeft;
          if(isLeft) {
            return Html(data: goodDetail);
          } else {
            return Center(
              child: Text(
                '暂时没有数据'
              ),
            );
          }
        },
      ),
    );
  }
}